<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Operator extends Model
{

    protected $fillable = [];

    public function getoperators(){
        $get = Operator::all()->keyBy('id')->toArray();
        return $get;
    }

    public function operatorline(){
        return $this->hasOne(OperatorLine::class, 'line', 'id');
    }

    public function operatortype(){
        return $this->hasOne(OperatorType::class, 'type', 'id');
    }

    public function getid($id){
        $get = Operator::find($id)->toArray();
        return $get;
    }
}
